package com.example.newsdaily.utl;


import ohos.app.Context;
import ohos.data.DatabaseHelper;
import ohos.data.preferences.Preferences;

public class LocalDataUtil {

    public static Preferences preferences=null;
    //定义本地数据库对象
    public static DatabaseHelper databaseHelper;
    //初始化数据库
    public static void initDB(Context context, String dbName){
        databaseHelper=new DatabaseHelper(context);
        preferences=databaseHelper.getPreferences(dbName);
    }

}
